 function mailpass() {
  document.forms['mainform'].action="mailsending.php";
  document.forms['mainform'].submit();
 }

 function showpasspane(content) {
  document.getElementById(content).style.visibility = "visible";
 }

 function hidepasspane(content) {
  document.getElementById(content).style.visibility = "hidden";
 }

 function chiasmuspass() {
  var passMail = document.createElement("input");
  passMail.setAttribute("type", "hidden");
  passMail.setAttribute("name","psml");
  passMail.setAttribute("value", document.forms['passform'].mailpass.value);
  document.forms['mainform'].appendChild(passMail);
 }